﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class MenuRoleMapping : ActiveRecordBase<MenuRoleMapping>
    {
		#region Const Definition
		
		public const string CONST_MenuRoleID							= "MenuRoleID";
		public const string CONST_MenuID								= "MenuID";
		public const string CONST_RoleID								= "RoleID";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _menuRoleID;
        
        // Non Key

        // Parents
        private Role _roleID;
        private MenuConfig _menuID;
        
        
		

        #endregion

        public MenuRoleMapping() {
               
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_MENUROLEMAPPING_MENUROLEID")]
		#endif
        public System.Int32 MenuRoleID {
            get { return this._menuRoleID; }
            set {  this._menuRoleID = value; }
        }
        
        // Non Key
        
        // Parent Relationships
        [BelongsTo("RoleID")]
        public Role RoleID {
            get { return this._roleID; }
            set { this._roleID = value; }
        }
        
        [BelongsTo("MenuID")]
        public MenuConfig MenuID {
            get { return this._menuID; }
            set { this._menuID = value; }
        }
        
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public MenuRoleMapping Clone()
		{
			MenuRoleMapping newMenuRoleMapping = new MenuRoleMapping();
			
            newMenuRoleMapping.RoleID = this._roleID ; 
            newMenuRoleMapping.MenuID = this._menuID ; 
			return newMenuRoleMapping;
		}
    }
}



